#include "Item.h"
#include "Weapon.h"
#include "Armor.h"
#include "Book.h"
#include "Food.h"
#include "Potion.h"
#include <vector>

using namespace std;

#pragma once
class Inventory
{
public:
	Inventory(int defaultMax = 10);
	~Inventory();
	Inventory(const Inventory& i);
	Inventory& operator=(const Inventory& i);

	//accessors
	int getBackPackSize() const;
	int getOccupiedInventory() const;
	bool hasFreeSpace() const;

	Weapon& getWeapon(int pos) const;
	Armor& getArmor(int pos) const;
	Book& getBook(int pos) const;
	Food& getFood(int pos) const;
	Potion& getPotion(int pos) const;

	//mutators
	void setBackPackSize(int i);
	
	void setWeapon(const Weapon&);
	void setWeapon(const Weapon&, int);
	void deleteWeapon(int);
	void setArmor(const Armor&);
	void setArmor(const Armor&, int);
	void deleteArmor(int);
	void setBook(const Book&);
	void setBook(const Book&, int);
	void deleteBook(int);
	void setFood(const Food&);
	void setFood(const Food&, int);
	void deleteFood(int);
	void setPotion(const Potion&);
	void setPotion(const Potion&, int);
	void deletePotion(int);

private:
	int backPackSize;
	vector<Weapon> weapons;
	vector<Armor> armors;
	vector<Book> books;
	vector<Food> food;
	vector<Potion> potions;
};